<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>SFML - Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html;"/>
        <meta charset="utf-8"/>
        <!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
        <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="dynsections.js"></script>
        <link rel="stylesheet" type="text/css" href="search/search.css" />
        <link rel="stylesheet" type="text/css" href="searchOverrides.css" />
        <script type="text/javascript" src="search/searchdata.js"></script>
        <script type="text/javascript" src="search/search.js"></script>
        <script type="text/javascript">
        /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
          $(document).ready(function() { init_search(); });
        /* @license-end */
        </script>
    </head>
    <body>
        <div id="banner-container">
            <div id="banner">
                <span id="sfml">SFML 2.6.1</span>
            </div>
        </div>
        <div id="content">
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1View.html">View</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsf_1_1View-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">sf::View Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>2D camera that defines what region is shown on screen  
 <a href="classsf_1_1View.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="View_8hpp_source.html">SFML/Graphics/View.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a28c38308ff089ae5bdacd001d12286d3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a28c38308ff089ae5bdacd001d12286d3">View</a> ()</td></tr>
<tr class="memdesc:a28c38308ff089ae5bdacd001d12286d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <br /></td></tr>
<tr class="separator:a28c38308ff089ae5bdacd001d12286d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d63bc49e041b3b1ff992bb6430e1326"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a1d63bc49e041b3b1ff992bb6430e1326">View</a> (const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp;rectangle)</td></tr>
<tr class="memdesc:a1d63bc49e041b3b1ff992bb6430e1326"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct the view from a rectangle.  <br /></td></tr>
<tr class="separator:a1d63bc49e041b3b1ff992bb6430e1326"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdaf84cfc910ef160450d63603457ea4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#afdaf84cfc910ef160450d63603457ea4">View</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;center, const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;size)</td></tr>
<tr class="memdesc:afdaf84cfc910ef160450d63603457ea4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct the view from its center and size.  <br /></td></tr>
<tr class="separator:afdaf84cfc910ef160450d63603457ea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8e3fedb008306ff9811163545fb75f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#aa8e3fedb008306ff9811163545fb75f2">setCenter</a> (float x, float y)</td></tr>
<tr class="memdesc:aa8e3fedb008306ff9811163545fb75f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the center of the view.  <br /></td></tr>
<tr class="separator:aa8e3fedb008306ff9811163545fb75f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0296b03793e0873e6ae9e15311f3e78"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#ab0296b03793e0873e6ae9e15311f3e78">setCenter</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;center)</td></tr>
<tr class="memdesc:ab0296b03793e0873e6ae9e15311f3e78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the center of the view.  <br /></td></tr>
<tr class="separator:ab0296b03793e0873e6ae9e15311f3e78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9525b73fe9fbaceb9568faf56b399dab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a9525b73fe9fbaceb9568faf56b399dab">setSize</a> (float width, float height)</td></tr>
<tr class="memdesc:a9525b73fe9fbaceb9568faf56b399dab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the size of the view.  <br /></td></tr>
<tr class="separator:a9525b73fe9fbaceb9568faf56b399dab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e08d471ce21aa0e69ce55ff9de66d29"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a9e08d471ce21aa0e69ce55ff9de66d29">setSize</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;size)</td></tr>
<tr class="memdesc:a9e08d471ce21aa0e69ce55ff9de66d29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the size of the view.  <br /></td></tr>
<tr class="separator:a9e08d471ce21aa0e69ce55ff9de66d29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24d0503c9c51f5ef5918612786d325c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a24d0503c9c51f5ef5918612786d325c1">setRotation</a> (float angle)</td></tr>
<tr class="memdesc:a24d0503c9c51f5ef5918612786d325c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the orientation of the view.  <br /></td></tr>
<tr class="separator:a24d0503c9c51f5ef5918612786d325c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8eaec46b7d332fe834f016d0187d4b4a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a8eaec46b7d332fe834f016d0187d4b4a">setViewport</a> (const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp;viewport)</td></tr>
<tr class="memdesc:a8eaec46b7d332fe834f016d0187d4b4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the target viewport.  <br /></td></tr>
<tr class="separator:a8eaec46b7d332fe834f016d0187d4b4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac95b636eafab3922b7e8304fb6c00d7d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#ac95b636eafab3922b7e8304fb6c00d7d">reset</a> (const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp;rectangle)</td></tr>
<tr class="memdesc:ac95b636eafab3922b7e8304fb6c00d7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the view to the given rectangle.  <br /></td></tr>
<tr class="separator:ac95b636eafab3922b7e8304fb6c00d7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bd01cd2bcad03e547232b190c215b09"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a8bd01cd2bcad03e547232b190c215b09">getCenter</a> () const</td></tr>
<tr class="memdesc:a8bd01cd2bcad03e547232b190c215b09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the center of the view.  <br /></td></tr>
<tr class="separator:a8bd01cd2bcad03e547232b190c215b09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57e4a87cf0d724678675d22a0093719a"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a57e4a87cf0d724678675d22a0093719a">getSize</a> () const</td></tr>
<tr class="memdesc:a57e4a87cf0d724678675d22a0093719a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the view.  <br /></td></tr>
<tr class="separator:a57e4a87cf0d724678675d22a0093719a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a324d8885f4ab17f1f7b0313580c9b84e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a324d8885f4ab17f1f7b0313580c9b84e">getRotation</a> () const</td></tr>
<tr class="memdesc:a324d8885f4ab17f1f7b0313580c9b84e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current orientation of the view.  <br /></td></tr>
<tr class="separator:a324d8885f4ab17f1f7b0313580c9b84e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2006fa4269078be4fd5ca999dcb6244"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#aa2006fa4269078be4fd5ca999dcb6244">getViewport</a> () const</td></tr>
<tr class="memdesc:aa2006fa4269078be4fd5ca999dcb6244"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the target viewport rectangle of the view.  <br /></td></tr>
<tr class="separator:aa2006fa4269078be4fd5ca999dcb6244"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c82144b837caf812f7cb25a43d80c41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a0c82144b837caf812f7cb25a43d80c41">move</a> (float offsetX, float offsetY)</td></tr>
<tr class="memdesc:a0c82144b837caf812f7cb25a43d80c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move the view relatively to its current position.  <br /></td></tr>
<tr class="separator:a0c82144b837caf812f7cb25a43d80c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c98a6e04fed756dfaff8f629de50862"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a4c98a6e04fed756dfaff8f629de50862">move</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;offset)</td></tr>
<tr class="memdesc:a4c98a6e04fed756dfaff8f629de50862"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move the view relatively to its current position.  <br /></td></tr>
<tr class="separator:a4c98a6e04fed756dfaff8f629de50862"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fd3901aae1845586ca40add94faa378"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a5fd3901aae1845586ca40add94faa378">rotate</a> (float angle)</td></tr>
<tr class="memdesc:a5fd3901aae1845586ca40add94faa378"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate the view relatively to its current orientation.  <br /></td></tr>
<tr class="separator:a5fd3901aae1845586ca40add94faa378"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a72a360a5792fbe4e99cd6feaf7726e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#a4a72a360a5792fbe4e99cd6feaf7726e">zoom</a> (float factor)</td></tr>
<tr class="memdesc:a4a72a360a5792fbe4e99cd6feaf7726e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resize the view rectangle relatively to its current size.  <br /></td></tr>
<tr class="separator:a4a72a360a5792fbe4e99cd6feaf7726e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9c1dab0cb8c1ac143b031035d821ce5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#ac9c1dab0cb8c1ac143b031035d821ce5">getTransform</a> () const</td></tr>
<tr class="memdesc:ac9c1dab0cb8c1ac143b031035d821ce5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the projection transform of the view.  <br /></td></tr>
<tr class="separator:ac9c1dab0cb8c1ac143b031035d821ce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa685c17a56aae7c7df4c90ea6285fd46"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1View.html#aa685c17a56aae7c7df4c90ea6285fd46">getInverseTransform</a> () const</td></tr>
<tr class="memdesc:aa685c17a56aae7c7df4c90ea6285fd46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the inverse projection transform of the view.  <br /></td></tr>
<tr class="separator:aa685c17a56aae7c7df4c90ea6285fd46"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>2D camera that defines what region is shown on screen </p>
<p><a class="el" href="classsf_1_1View.html" title="2D camera that defines what region is shown on screen">sf::View</a> defines a camera in the 2D scene.</p>
<p>This is a very powerful concept: you can scroll, rotate or zoom the entire scene without altering the way that your drawable objects are drawn.</p>
<p>A view is composed of a source rectangle, which defines what part of the 2D scene is shown, and a target viewport, which defines where the contents of the source rectangle will be displayed on the render target (window or texture).</p>
<p>The viewport allows to map the scene to a custom part of the render target, and can be used for split-screen or for displaying a minimap, for example. If the source rectangle doesn't have the same size as the viewport, its contents will be stretched to fit in.</p>
<p>To apply a view, you have to assign it to the render target. Then, objects drawn in this render target will be affected by the view until you use another view.</p>
<p>Usage example: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classsf_1_1RenderWindow.html">sf::RenderWindow</a> window;</div>
<div class="line"><a class="code hl_class" href="classsf_1_1View.html">sf::View</a> view;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Initialize the view to a rectangle located at (100, 100) and with a size of 400x200</span></div>
<div class="line">view.<a class="code hl_function" href="classsf_1_1View.html#ac95b636eafab3922b7e8304fb6c00d7d">reset</a>(<a class="code hl_class" href="classsf_1_1Rect.html">sf::FloatRect</a>(100, 100, 400, 200));</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Rotate it by 45 degrees</span></div>
<div class="line">view.<a class="code hl_function" href="classsf_1_1View.html#a5fd3901aae1845586ca40add94faa378">rotate</a>(45);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set its target viewport to be half of the window</span></div>
<div class="line">view.<a class="code hl_function" href="classsf_1_1View.html#a8eaec46b7d332fe834f016d0187d4b4a">setViewport</a>(<a class="code hl_class" href="classsf_1_1Rect.html">sf::FloatRect</a>(0.f, 0.f, 0.5f, 1.f));</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Apply it</span></div>
<div class="line">window.<a class="code hl_function" href="classsf_1_1RenderTarget.html#a063db6dd0a14913504af30e50cb6d946">setView</a>(view);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Render stuff</span></div>
<div class="line">window.<a class="code hl_function" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a>(someSprite);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set the default view back</span></div>
<div class="line">window.<a class="code hl_function" href="classsf_1_1RenderTarget.html#a063db6dd0a14913504af30e50cb6d946">setView</a>(window.<a class="code hl_function" href="classsf_1_1RenderTarget.html#a7741129e3ef7ab4f0a40024fca13480c">getDefaultView</a>());</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Render stuff not affected by the view</span></div>
<div class="line">window.<a class="code hl_function" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a>(someText);</div>
<div class="ttc" id="aclasssf_1_1Rect_html"><div class="ttname"><a href="classsf_1_1Rect.html">sf::Rect&lt; float &gt;</a></div></div>
<div class="ttc" id="aclasssf_1_1RenderTarget_html_a063db6dd0a14913504af30e50cb6d946"><div class="ttname"><a href="classsf_1_1RenderTarget.html#a063db6dd0a14913504af30e50cb6d946">sf::RenderTarget::setView</a></div><div class="ttdeci">void setView(const View &amp;view)</div><div class="ttdoc">Change the current active view.</div></div>
<div class="ttc" id="aclasssf_1_1RenderTarget_html_a12417a3bcc245c41d957b29583556f39"><div class="ttname"><a href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">sf::RenderTarget::draw</a></div><div class="ttdeci">void draw(const Drawable &amp;drawable, const RenderStates &amp;states=RenderStates::Default)</div><div class="ttdoc">Draw a drawable object to the render target.</div></div>
<div class="ttc" id="aclasssf_1_1RenderTarget_html_a7741129e3ef7ab4f0a40024fca13480c"><div class="ttname"><a href="classsf_1_1RenderTarget.html#a7741129e3ef7ab4f0a40024fca13480c">sf::RenderTarget::getDefaultView</a></div><div class="ttdeci">const View &amp; getDefaultView() const</div><div class="ttdoc">Get the default view of the render target.</div></div>
<div class="ttc" id="aclasssf_1_1RenderWindow_html"><div class="ttname"><a href="classsf_1_1RenderWindow.html">sf::RenderWindow</a></div><div class="ttdoc">Window that can serve as a target for 2D drawing.</div><div class="ttdef"><b>Definition</b> <a href="RenderWindow_8hpp_source.html#l00044">RenderWindow.hpp:45</a></div></div>
<div class="ttc" id="aclasssf_1_1View_html"><div class="ttname"><a href="classsf_1_1View.html">sf::View</a></div><div class="ttdoc">2D camera that defines what region is shown on screen</div><div class="ttdef"><b>Definition</b> <a href="View_8hpp_source.html#l00043">View.hpp:44</a></div></div>
<div class="ttc" id="aclasssf_1_1View_html_a5fd3901aae1845586ca40add94faa378"><div class="ttname"><a href="classsf_1_1View.html#a5fd3901aae1845586ca40add94faa378">sf::View::rotate</a></div><div class="ttdeci">void rotate(float angle)</div><div class="ttdoc">Rotate the view relatively to its current orientation.</div></div>
<div class="ttc" id="aclasssf_1_1View_html_a8eaec46b7d332fe834f016d0187d4b4a"><div class="ttname"><a href="classsf_1_1View.html#a8eaec46b7d332fe834f016d0187d4b4a">sf::View::setViewport</a></div><div class="ttdeci">void setViewport(const FloatRect &amp;viewport)</div><div class="ttdoc">Set the target viewport.</div></div>
<div class="ttc" id="aclasssf_1_1View_html_ac95b636eafab3922b7e8304fb6c00d7d"><div class="ttname"><a href="classsf_1_1View.html#ac95b636eafab3922b7e8304fb6c00d7d">sf::View::reset</a></div><div class="ttdeci">void reset(const FloatRect &amp;rectangle)</div><div class="ttdoc">Reset the view to the given rectangle.</div></div>
</div><!-- fragment --><p>See also the note on coordinates and undistorted rendering in <a class="el" href="classsf_1_1Transformable.html" title="Decomposed transform defined by a position, a rotation and a scale.">sf::Transformable</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderWindow.html" title="Window that can serve as a target for 2D drawing.">sf::RenderWindow</a>, <a class="el" href="classsf_1_1RenderTexture.html" title="Target for off-screen 2D rendering into a texture.">sf::RenderTexture</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="View_8hpp_source.html#l00043">43</a> of file <a class="el" href="View_8hpp_source.html">View.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a28c38308ff089ae5bdacd001d12286d3" name="a28c38308ff089ae5bdacd001d12286d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28c38308ff089ae5bdacd001d12286d3">&#9670;&#160;</a></span>View() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::View::View </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>This constructor creates a default view of (0, 0, 1000, 1000) </p>

</div>
</div>
<a id="a1d63bc49e041b3b1ff992bb6430e1326" name="a1d63bc49e041b3b1ff992bb6430e1326"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d63bc49e041b3b1ff992bb6430e1326">&#9670;&#160;</a></span>View() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sf::View::View </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp;&#160;</td>
          <td class="paramname"><em>rectangle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct the view from a rectangle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rectangle</td><td>Rectangle defining the zone to display </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afdaf84cfc910ef160450d63603457ea4" name="afdaf84cfc910ef160450d63603457ea4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdaf84cfc910ef160450d63603457ea4">&#9670;&#160;</a></span>View() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::View::View </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>center</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct the view from its center and size. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">center</td><td>Center of the zone to display </td></tr>
    <tr><td class="paramname">size</td><td>Size of zone to display </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a8bd01cd2bcad03e547232b190c215b09" name="a8bd01cd2bcad03e547232b190c215b09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8bd01cd2bcad03e547232b190c215b09">&#9670;&#160;</a></span>getCenter()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp; sf::View::getCenter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the center of the view. </p>
<dl class="section return"><dt>Returns</dt><dd>Center of the view</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a57e4a87cf0d724678675d22a0093719a" title="Get the size of the view.">getSize</a>, <a class="el" href="classsf_1_1View.html#aa8e3fedb008306ff9811163545fb75f2" title="Set the center of the view.">setCenter</a> </dd></dl>

</div>
</div>
<a id="aa685c17a56aae7c7df4c90ea6285fd46" name="aa685c17a56aae7c7df4c90ea6285fd46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa685c17a56aae7c7df4c90ea6285fd46">&#9670;&#160;</a></span>getInverseTransform()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp; sf::View::getInverseTransform </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the inverse projection transform of the view. </p>
<p>This function is meant for internal use only.</p>
<dl class="section return"><dt>Returns</dt><dd>Inverse of the projection transform defining the view</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#ac9c1dab0cb8c1ac143b031035d821ce5" title="Get the projection transform of the view.">getTransform</a> </dd></dl>

</div>
</div>
<a id="a324d8885f4ab17f1f7b0313580c9b84e" name="a324d8885f4ab17f1f7b0313580c9b84e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a324d8885f4ab17f1f7b0313580c9b84e">&#9670;&#160;</a></span>getRotation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sf::View::getRotation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current orientation of the view. </p>
<dl class="section return"><dt>Returns</dt><dd>Rotation angle of the view, in degrees</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a24d0503c9c51f5ef5918612786d325c1" title="Set the orientation of the view.">setRotation</a> </dd></dl>

</div>
</div>
<a id="a57e4a87cf0d724678675d22a0093719a" name="a57e4a87cf0d724678675d22a0093719a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57e4a87cf0d724678675d22a0093719a">&#9670;&#160;</a></span>getSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp; sf::View::getSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the size of the view. </p>
<dl class="section return"><dt>Returns</dt><dd>Size of the view</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a8bd01cd2bcad03e547232b190c215b09" title="Get the center of the view.">getCenter</a>, <a class="el" href="classsf_1_1View.html#a9525b73fe9fbaceb9568faf56b399dab" title="Set the size of the view.">setSize</a> </dd></dl>

</div>
</div>
<a id="ac9c1dab0cb8c1ac143b031035d821ce5" name="ac9c1dab0cb8c1ac143b031035d821ce5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9c1dab0cb8c1ac143b031035d821ce5">&#9670;&#160;</a></span>getTransform()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp; sf::View::getTransform </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the projection transform of the view. </p>
<p>This function is meant for internal use only.</p>
<dl class="section return"><dt>Returns</dt><dd>Projection transform defining the view</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#aa685c17a56aae7c7df4c90ea6285fd46" title="Get the inverse projection transform of the view.">getInverseTransform</a> </dd></dl>

</div>
</div>
<a id="aa2006fa4269078be4fd5ca999dcb6244" name="aa2006fa4269078be4fd5ca999dcb6244"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2006fa4269078be4fd5ca999dcb6244">&#9670;&#160;</a></span>getViewport()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp; sf::View::getViewport </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the target viewport rectangle of the view. </p>
<dl class="section return"><dt>Returns</dt><dd>Viewport rectangle, expressed as a factor of the target size</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a8eaec46b7d332fe834f016d0187d4b4a" title="Set the target viewport.">setViewport</a> </dd></dl>

</div>
</div>
<a id="a4c98a6e04fed756dfaff8f629de50862" name="a4c98a6e04fed756dfaff8f629de50862"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c98a6e04fed756dfaff8f629de50862">&#9670;&#160;</a></span>move() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::move </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>offset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move the view relatively to its current position. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offset</td><td>Move offset</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#aa8e3fedb008306ff9811163545fb75f2" title="Set the center of the view.">setCenter</a>, <a class="el" href="classsf_1_1View.html#a5fd3901aae1845586ca40add94faa378" title="Rotate the view relatively to its current orientation.">rotate</a>, <a class="el" href="classsf_1_1View.html#a4a72a360a5792fbe4e99cd6feaf7726e" title="Resize the view rectangle relatively to its current size.">zoom</a> </dd></dl>

</div>
</div>
<a id="a0c82144b837caf812f7cb25a43d80c41" name="a0c82144b837caf812f7cb25a43d80c41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c82144b837caf812f7cb25a43d80c41">&#9670;&#160;</a></span>move() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::move </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>offsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>offsetY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move the view relatively to its current position. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offsetX</td><td>X coordinate of the move offset </td></tr>
    <tr><td class="paramname">offsetY</td><td>Y coordinate of the move offset</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#aa8e3fedb008306ff9811163545fb75f2" title="Set the center of the view.">setCenter</a>, <a class="el" href="classsf_1_1View.html#a5fd3901aae1845586ca40add94faa378" title="Rotate the view relatively to its current orientation.">rotate</a>, <a class="el" href="classsf_1_1View.html#a4a72a360a5792fbe4e99cd6feaf7726e" title="Resize the view rectangle relatively to its current size.">zoom</a> </dd></dl>

</div>
</div>
<a id="ac95b636eafab3922b7e8304fb6c00d7d" name="ac95b636eafab3922b7e8304fb6c00d7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac95b636eafab3922b7e8304fb6c00d7d">&#9670;&#160;</a></span>reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::reset </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp;&#160;</td>
          <td class="paramname"><em>rectangle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset the view to the given rectangle. </p>
<p>Note that this function resets the rotation angle to 0.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rectangle</td><td>Rectangle defining the zone to display</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#aa8e3fedb008306ff9811163545fb75f2" title="Set the center of the view.">setCenter</a>, <a class="el" href="classsf_1_1View.html#a9525b73fe9fbaceb9568faf56b399dab" title="Set the size of the view.">setSize</a>, <a class="el" href="classsf_1_1View.html#a24d0503c9c51f5ef5918612786d325c1" title="Set the orientation of the view.">setRotation</a> </dd></dl>

</div>
</div>
<a id="a5fd3901aae1845586ca40add94faa378" name="a5fd3901aae1845586ca40add94faa378"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5fd3901aae1845586ca40add94faa378">&#9670;&#160;</a></span>rotate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::rotate </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>angle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rotate the view relatively to its current orientation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">angle</td><td>Angle to rotate, in degrees</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a24d0503c9c51f5ef5918612786d325c1" title="Set the orientation of the view.">setRotation</a>, <a class="el" href="classsf_1_1View.html#a0c82144b837caf812f7cb25a43d80c41" title="Move the view relatively to its current position.">move</a>, <a class="el" href="classsf_1_1View.html#a4a72a360a5792fbe4e99cd6feaf7726e" title="Resize the view rectangle relatively to its current size.">zoom</a> </dd></dl>

</div>
</div>
<a id="ab0296b03793e0873e6ae9e15311f3e78" name="ab0296b03793e0873e6ae9e15311f3e78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0296b03793e0873e6ae9e15311f3e78">&#9670;&#160;</a></span>setCenter() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::setCenter </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>center</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the center of the view. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">center</td><td>New center</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a9525b73fe9fbaceb9568faf56b399dab" title="Set the size of the view.">setSize</a>, <a class="el" href="classsf_1_1View.html#a8bd01cd2bcad03e547232b190c215b09" title="Get the center of the view.">getCenter</a> </dd></dl>

</div>
</div>
<a id="aa8e3fedb008306ff9811163545fb75f2" name="aa8e3fedb008306ff9811163545fb75f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8e3fedb008306ff9811163545fb75f2">&#9670;&#160;</a></span>setCenter() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::setCenter </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the center of the view. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X coordinate of the new center </td></tr>
    <tr><td class="paramname">y</td><td>Y coordinate of the new center</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a9525b73fe9fbaceb9568faf56b399dab" title="Set the size of the view.">setSize</a>, <a class="el" href="classsf_1_1View.html#a8bd01cd2bcad03e547232b190c215b09" title="Get the center of the view.">getCenter</a> </dd></dl>

</div>
</div>
<a id="a24d0503c9c51f5ef5918612786d325c1" name="a24d0503c9c51f5ef5918612786d325c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24d0503c9c51f5ef5918612786d325c1">&#9670;&#160;</a></span>setRotation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::setRotation </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>angle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the orientation of the view. </p>
<p>The default rotation of a view is 0 degree.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">angle</td><td>New angle, in degrees</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a324d8885f4ab17f1f7b0313580c9b84e" title="Get the current orientation of the view.">getRotation</a> </dd></dl>

</div>
</div>
<a id="a9e08d471ce21aa0e69ce55ff9de66d29" name="a9e08d471ce21aa0e69ce55ff9de66d29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e08d471ce21aa0e69ce55ff9de66d29">&#9670;&#160;</a></span>setSize() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::setSize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the size of the view. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>New size</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#aa8e3fedb008306ff9811163545fb75f2" title="Set the center of the view.">setCenter</a>, <a class="el" href="classsf_1_1View.html#a8bd01cd2bcad03e547232b190c215b09" title="Get the center of the view.">getCenter</a> </dd></dl>

</div>
</div>
<a id="a9525b73fe9fbaceb9568faf56b399dab" name="a9525b73fe9fbaceb9568faf56b399dab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9525b73fe9fbaceb9568faf56b399dab">&#9670;&#160;</a></span>setSize() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::setSize </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the size of the view. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>New width of the view </td></tr>
    <tr><td class="paramname">height</td><td>New height of the view</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#aa8e3fedb008306ff9811163545fb75f2" title="Set the center of the view.">setCenter</a>, <a class="el" href="classsf_1_1View.html#a8bd01cd2bcad03e547232b190c215b09" title="Get the center of the view.">getCenter</a> </dd></dl>

</div>
</div>
<a id="a8eaec46b7d332fe834f016d0187d4b4a" name="a8eaec46b7d332fe834f016d0187d4b4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8eaec46b7d332fe834f016d0187d4b4a">&#9670;&#160;</a></span>setViewport()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::setViewport </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Rect.html">FloatRect</a> &amp;&#160;</td>
          <td class="paramname"><em>viewport</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the target viewport. </p>
<p>The viewport is the rectangle into which the contents of the view are displayed, expressed as a factor (between 0 and 1) of the size of the <a class="el" href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...)">RenderTarget</a> to which the view is applied. For example, a view which takes the left side of the target would be defined with <a class="el" href="classsf_1_1View.html#a8eaec46b7d332fe834f016d0187d4b4a" title="Set the target viewport.">View.setViewport</a>(sf::FloatRect(0, 0, 0.5, 1)). By default, a view has a viewport which covers the entire target.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">viewport</td><td>New viewport rectangle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#aa2006fa4269078be4fd5ca999dcb6244" title="Get the target viewport rectangle of the view.">getViewport</a> </dd></dl>

</div>
</div>
<a id="a4a72a360a5792fbe4e99cd6feaf7726e" name="a4a72a360a5792fbe4e99cd6feaf7726e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a72a360a5792fbe4e99cd6feaf7726e">&#9670;&#160;</a></span>zoom()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::View::zoom </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>factor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resize the view rectangle relatively to its current size. </p>
<p>Resizing the view simulates a zoom, as the zone displayed on screen grows or shrinks. <em>factor</em> is a multiplier: </p><ul>
<li>1 keeps the size unchanged </li>
<li>&gt; 1 makes the view bigger (objects appear smaller) </li>
<li>&lt; 1 makes the view smaller (objects appear bigger)</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">factor</td><td>Zoom factor to apply</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1View.html#a9525b73fe9fbaceb9568faf56b399dab" title="Set the size of the view.">setSize</a>, <a class="el" href="classsf_1_1View.html#a0c82144b837caf812f7cb25a43d80c41" title="Move the view relatively to its current position.">move</a>, <a class="el" href="classsf_1_1View.html#a5fd3901aae1845586ca40add94faa378" title="Rotate the view relatively to its current orientation.">rotate</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="View_8hpp_source.html">View.hpp</a></li>
</ul>
</div><!-- contents -->
        </div>
        <div id="footer-container">
            <div id="footer">
                SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
                Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
                Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
            </div>
        </div>
    </body>
</html>
